package day6;

import java.util.Arrays;

class Alg {
    public static <E extends Comparable<E>> E findmax(E[]arr)
    {
        E max=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if(max.compareTo(arr[i])<0)
            {
                max=arr[i];
            }
        }
        return max;
    }
}
public class frame1 {
    public static void main(String[] args) {
        Integer[] arr={10,60,80,31,2,67,100,25,16};
        Integer ret=Alg.findmax(arr);
        System.out.println(ret);
    }
}
